<?php
/**
 * Created by PhpStorm.
 * User: Soha_Ros
 * Date: 17/6/10
 * Time: 下午5:31
 */

namespace ActionsHttp;


use Data\Restaurant_DAO;

class RestaurantInfoGetBase extends BaseActionHttp
{
    public function doAction() {

        parent::doAction();

        // 商铺id
        $restaurant_id = $_SESSION[RESTAURANT_ID];
        $restaurant_id = 1;


        $restaurant_record = Restaurant_DAO::getRecord($restaurant_id);

        if (!$restaurant_record) {
            return $this->SendErrMsg("没有该商铺");
        }

        $base_info = array(
            RESTAURANT_NAME => $restaurant_record->getRESTAURANT_NAME(),
            IMG_URL => $restaurant_record->getIMG_URL(),
            OPENING_TIME => $restaurant_record->getOPENING_TIME()
        );

        $this->setValue(Restaurant_base,$base_info);

        // 返回数据
        $this->ResponseDataToCurrentClient();

    }
}